import { RouteRecordRaw, RouterView } from 'vue-router'

import { redirectPath } from '../help'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/admin/class-manage',
    component: RouterView,
    meta: { title: '课程列表', auth: 'admin-class-manage-list' },
    redirect: redirectPath,
    children: [
      {
        path: '/admin/class-manage/list',
        component: () => import('@/views/admin/class-manage/list/index.vue'),
        meta: { title: '课程列表', auth: ['admin-class-manage-list'] },
        children: []
      },
      {
        path: '/admin/class-manage/list/edit',
        component: () => import('@/views/admin/class-manage/edit/index.vue'),
        meta: { title: '课程详情', auth: ['admin-class-manage-add', 'admin-class-manage-edit'] }
      }
    ]
  }
]

export default routes
